package bishi;

import java.util.Scanner;

/**
 * @Author liuhaoqi
 * @Date 2020/9/13 13:13
 * @Version 1.0
 */
public class CCF20200601 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] arr = new int[n][3];
        for (int i = 0; i < n; i++) {
            arr[i][0] = scanner.nextInt();
            arr[i][1] = scanner.nextInt();
            arr[i][2] = scanner.next().charAt(0);
        }
        int[][] fun = new int[m][3];
        for (int i = 0; i < m; i++) {
            fun[i][0] = scanner.nextInt();
            fun[i][1] = scanner.nextInt();
            fun[i][2] = scanner.nextInt();
        }
        for (int i = 0; i < m; i++) {
            int flag = 0;
            int isWant = 1;
            long b = fun[i][0] + fun[i][1] * arr[0][0] + fun[i][2] * arr[0][1];
            if (b < 0 && arr[0][2] == 65) {
                flag = 1;
            }
            if (m == 1) {
                System.out.println("Yes");
                break;
            }
            for (int j = 1; j < n; j++) {
                long temp = fun[i][0] + fun[i][1] * arr[j][0] + fun[i][2] * arr[j][1];
                if (flag == 1) {
                    if ((temp > 0 && arr[j][2] == 65) || (temp < 0 && arr[j][2] == 66)) {
                        System.out.println("No");
                        isWant = 0;
                        break;
                    }
                } else {
                    if ((temp < 0 && arr[j][2] == 65) || (temp > 0 && arr[j][2] == 66)) {
                        System.out.println("No");
                        isWant = 0;
                        break;
                    }
                }
            }
            if (isWant == 1) {
                System.out.println("Yes");
            }
        }
    }
}
